<template>
    <div class="app-container summarys-custom-content">
        <FilterForm :data="filterData" @search="getList" labelWidth="86px" />
        <Table
            :api="$Api.sales.summarizing.customer"
            :selection="true"
            height="60vh"
            ref="Table"
            :summary= true>
            <el-table-column label="客户" align="center" prop="customerName"  />
            <el-table-column label="件数" align="center" prop="pieceCount" width="120"/>
            <el-table-column label="方数" align="center" prop="salesCount"  />
            <el-table-column label="金额" align="center" prop="money" />
            <el-table-column label="折扣" align="center" prop="rebate" width="120"/>
            <el-table-column label="已收款" align="center" prop="receivedMoney"  />
            <el-table-column label="未收款" align="center" prop="receivedMoney"  />
        </Table>
    </div>
</template>

<script>

export default {
    data: () =>{
        return{
            filterData:[
                {
                    label: "日期",
                    type: "period_date",
                    st: "beginRegisterTime",
                    end: "endRegisterTime",
                    scale: 2,
                },
                {
                    label: "客户",
                    name: "customerName",
                    type: "customer",
                },
            ]
        }
    },
    methods:{
        getList(params) {
            this.$refs.Table.getData(params);
        },
    }
}
</script>

<style lang="scss" scoped>
   
</style>